Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
public_html
/
admin
/
app
/
V2
/
Dtos
/
Filename :
BaseDTOBuilder.php
back
Copy
<?php namespace App\V2\Dtos; use App\Models\Group; use App\Models\Store; use App\Models\User; abstract class BaseDTOBuilder { protected BaseDTO $dto; protected function copyFrom(BaseDTO $dto){ $this->dto->current_group = $dto->current_group; $this->dto->current_user = $dto->current_user; $this->dto->current_store = $dto->current_store; $this->dto->limit = $dto->limit; $this->dto->page_no = $dto->page_no; $this->dto->order_by_column = $dto->order_by_column; $this->dto->order = $dto->order; $this->dto->only_count = $dto->only_count; } public function user(User $user){ $this->dto->current_user = $user; return $this; } public function group(Group $group) { $this->dto->current_group = $group; return $this; } public function store(Store $store) { $this->dto->current_store = $store; return $this; } public function limit($limit) { $this->dto->limit = $limit; return $this; } public function page_no($page_no){ $this->dto->page_no = $page_no; return $this; } public function orderByColumn($order_by_column){ $this->dto->order_by_column = $order_by_column; return $this; } public function order($order){ $this->dto->order = $order; return $this; } public function only_count($only_count){ $this->dto->only_count = $only_count; return $this; } } ?>